package Practice;
import java.util.Scanner;
public class FindFactory {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        int n=scan.nextInt();
        int sum=0;
        int tmp=1;
        for(int i=1;i<=n;i++){
            tmp*=i;
            sum+=tmp;
        }
        System.out.println(sum);
    }
}
